<?php
   /*
   Plugin Name: Fetch oDesk History
   Plugin URI: http://lehoaian.info
   Description: a plugin to fetch jobs history from oDesk profile.
   Version: 1.0
   Author: An Le
   Author URI: http://lehoaian.info
   License: GPL2
   */
?>
<?php
    require('oDeskAPI.lib.php');
    add_action('admin_menu', 'ofj_init');
    
    global $ofj_api_url;
    $ofj_api_url    = '~017b947e6bb09dadc5.json';
    
    // add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); 
    function ofj_init() {
        define('OFJ_DIR', plugin_dir_path(__FILE__));
        define('OFJ_URL', plugin_dir_url(__FILE__));
        
        // Add admin page
        add_menu_page( 'oDesk Fetch Jobs', 'oDesk Fetch Jobs', 'add_users', 'odesk-project-history', 'ofj_admin_page');  
    }
    
    function ofj_admin_page() {
        include(OFJ_DIR. 'ofj_admin_page.php');
    }
    
    function getJsonContent($url) {
        
    
    }
?>